<!DOCTYPE html>
<html>
<head>
<head />
<div th:include="base-libs :: base-libs" />
<title>新增签约</title>
<style type="text/css">
body {
	padding: 0px 10px;
}

.table>tbody>tr>td {
	vertical-align: middle !important;
	text-align: center !important;
}
</style>
</head>
<script type="text/javascript">

	$(function(){
        $(document).keydown(function(event){
            if(event.keyCode==13){
                btnNextHandler();
//                $(".form-control").blur();
            }
        });
	});

	/**查询按钮点击回调*/
function btnNextHandler() {
    if($(".form-control").QuickValidate()){
    	check();
    	//location = "manager?ZJHM=" + $("#ZJHM").val() + "&YLJGID=" + parent.userInfo.PTJGID;
    }
}
function check(){
	var params = {
			ZJHM : $("#ZJHM").val()
	}
	$.QuickRemote.AjaxJson("isExist",function(result){
		if (result["state"]) {
			location = "manager.html?ZJHM=" + $("#ZJHM").val();
		} else {
			var QYXXID = result.info.QYXXID;
			if(!StringUtils.isEmpty(QYXXID)){
				$.QuickAlert.alertConfirm({
					content : result.info["faultInfo"],//人员已预签约，是否删除预签约记录？
					callback : function() {
						$.QuickRemote.AjaxJson(contextRoot + "jtqy/delete", deleteBack, {QYXXID: QYXXID});
					}
				})
			}else{
				$.QuickAlert.alertFail({
					content : result.info["faultInfo"]
				});
			}
		}
	},params);
}

/** 删除预签约信息--回调  */
function deleteBack(result){
	if(result.state){
		$.QuickAlert.alertNormal('预签约信息删除成功！', {callback: function(){
			location = "manager.html?ZJHM=" + $("#ZJHM").val();
		}});
	}else{
		$.QuickAlert.alertFail({content: '删除预签约信息失败，请稍后重试...'});
	}
}
</script>
<body class="easyui-layout" fit="true" border="false">


	<div region="north"
		style="border: none; overflow: hidden; background-color: #f9f9f9;">
		<div style="width: 100%; margin-left: 30px">
			<h3 style="line-height: 41px; margin: 0px; font-size: 18px;font-weight: bold;text-align:center">新增签约</h3>
		</div>
		<table class="form-table" style="margin:0;padding:0;">
			<tr>
				<td class="td-text">证件类型：</td>
				<td class="td-content">
					<select id="ZJLX" name="ZJLX"
					class="form-control">
						<option value="01">身份证</option>
					</select>
				</td>
				<td class="td-text">证件号码：</td>
				<td class="td-content">
					<div style="display: inline;">
						<input id="ZJHM" name="ZJHM" class="form-control" type="text"
							placeholder="证件号码"
							quick-config="label:'证件号码', validateProxy:'notNull newIdCard'">
					</div>
				</td>
				<td class="td-text"></td>
				<td class="td-content"></td>
				<td class="td-text">
					<button id="btnNext" class="btn btn-info" type="button"
						onclick="btnNextHandler()">下一步</button>
				</td>
			</tr>
		</table>
	</div>
	<div region="center" style="height:150px;">
		<table id="dgForm">
		</table>
	</div>

</body>
</html>


















































